package com.xlobo.api.fund.service;

import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;

/**
 * 根据UserId和AccountType，冻结指定账户金额Call FreeMaker Template自动生成代码
 */
public class FreezeCall extends YmatouBaseCall {
	private static String opurl = "Fund/Freeze";

	public FreezeCall() {
		super(EnvSetup.getSystemUrl("fund_api_xlobo"), opurl, "POST", "JSON");
	}

	@Override
	public void addDefHeader() {
		client.addHeader("Accept", "text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}

	/**
	 * 获取响应信息状态
	 * 
	 * @return Status
	 */
	public String getStatus() {
		String Status = null;
		try {
			JSONObject jo = new JSONObject(getReturnData());
			Status = String.valueOf(jo.get("Status"));
		} catch (Exception e) {
			e.printStackTrace();
		}
		return Status;
	}

	/**
	 * 获取响应信息状态
	 * 
	 * @return Status
	 */
	public String getMessage() {
		String Message = null;
		try {
			JSONObject jo = new JSONObject(getReturnData());
			Message = String.valueOf(jo.get("Message"));
		} catch (Exception e) {
			e.printStackTrace();
		}
		return Message;
	}

	/**
	 * 获取响应信息状态
	 * 
	 * @return Status
	 */
	public String getRequestId() {
		String RequestId = null;
		try {
			JSONObject jo = new JSONObject(getReturnData());
			RequestId = String.valueOf(jo.get("Message"));
		} catch (Exception e) {
			e.printStackTrace();
		}
		return RequestId;
	}
}